package com.hotec.PROJECT_NAME.modules.sys.entity;

import com.gemcap.framework.data.entity.TreeAble;
import com.hotec.PROJECT_NAME.component.basic.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Size;
import java.util.List;


/**
 * 角色表
 *
 * @author llb
 */
@Data
@Table(name = "sys_role")
@Accessors(chain = true)
public class SysRole extends BaseEntity implements TreeAble<SysRole> {

    @Size(max = 50)
    @Column(name = "code")
    private String code;

    @Size(max = 255)
    @Column(name = "name")
    private String name;

    @Size(max = 64)
    @Column(name = "parent_id")
    private String parentId;

    @Size(max = 2000)
    @Column(name = "parent_path")
    private String parentPath;

    @Size(max = 500)
    @Column(name = "remark")
    private String remark;

    @Size(max = 200)
    @Column(name = "pname")
    private String pname;

    private String shopId;

    private String system;
    @Transient
    private List children;

    @Transient
    private List<SysResource> resources;
}
